package sel.me.webservice;

//import cn.com.webxml.ChinaStockWebService;

import com.cdyne.ws.weatherws.Weather;
import com.cdyne.ws.weatherws.WeatherReturn;
import com.cdyne.ws.weatherws.WeatherSoap;


public class TestWebService {

	StringBuilder sb;

	
	public void getWeather(StringBuilder sb){		
		Weather weather=new Weather();
		WeatherSoap ws = weather.getWeatherSoap();
		WeatherReturn wr=ws.getCityWeatherByZIP("95101");
		sb.append("The city is " +wr.getCity()+"\n");
		sb.append("The state is " +wr.getState()+"\n");
		sb.append("The wind is " +wr.getWind()+"\n");
		sb.append("The current temp is " +wr.getTemperature()+"\n");
		sb.append("The current Humidity is " +wr.getRelativeHumidity()+"\n");
	}
	
	
//	public void getStock(){
//		ChinaStockWebService csws=new ChinaStockWebService();
//		csws.getChinaStockWebServiceHttpGet().getStockInfoByCode("000858");
//		
//	}
	
	
	public static void main(String[] args) {
		TestWebService tws=new TestWebService();
		StringBuilder sb=new StringBuilder();
		tws.getWeather(sb);
		System.out.println(sb);
//		tws.getStock();
	}
}
